<template>
  <div id="app">

    <router-view/>

  </div>
</template>

<script>
export default {
  name: 'App',
  created(){
  	//this.getLocation();
  },
  methods:{
  	/*getLocation(){
  		const that = this;
  		AMap.plugin('AMap.Geolocation',function(){
  			var geolocaton  = new AMap.Geolocation({
  				enableHighAccuracy: true,//是否使用高精度定位，默认:true
              timeout: 10000,          //超过10秒后停止定位，默认：无穷大
              buttonOffset:new AMap.Pixel(10,20),
              zoomToAccuracy:true,
              buttonPosition: 'RB',    //定位按钮停靠位置，默认：'LB'，左下角

              zoomToAccuracy:true,//定位成功后调整地图视野范围使定位位置及精度范围视野内可见，默认：f

  			 });
  			golocation.getCurrentPosition();
  			AMap.event.addListener(geolocation,"complete",onComplete);
  			AMap.event.addListener(geolocation,"error",onError);
  			function onComplete(data){
  				console.log(data);
  			 }
  			function onComplete(data){
  				console.log(data);
  			 }
  			function onError(data){
  				console.log(data,"shibai")
  			 }
  		});
  	},
  	getLngLatLocation(){
  		AMap.plugin("AMap.CitySearch",function(){
  			var citySearch = new AMap.CitySearch();
  			citySearch.getLocalCity(function(status,result){
  				 if(status === 'complete' && result.info === "OK"){
  				 	console.log(result);
  				 }
  			})
  		})
  	}*/
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  text-align: center;
  background-color: #ffffff;
  /*margin-top: 60px;*/
}
</style>
